import Vue from 'vue';
import Router from 'vue-router';
import CategoryList from '@/components/CategoryList.vue';
import AddCategory from '@/components/AddCategory.vue'; // 新增分类组件
import EditCategory from '@/components/EditCategory.vue'; // 编辑分类组件
import CategoryDetails from '@/components/CategoryDetails.vue'; // 分类详情组件

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'CategoryList',
      component: CategoryList,
    },
    {
      path: '/add-category',
      name: 'AddCategory',
      component: AddCategory,
    },
    {
      path: '/edit-category',
      name: 'EditCategory',
      component: EditCategory,
    },
    {
      path: '/category-details',
      name: 'CategoryDetails',
      component: CategoryDetails,
    },
  ],
});
